/*************************************************************************
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 3 of the License.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ************************************************************************/


/**
 * @file
 * Debug.h
 *
 * @author
 * Pavel Hasenohrl (<a href="mailto:hasenpav@fel.cvut.cz">hasenpav@fel.cvut.cz</a>)
 *
 * @brief
 * This header contains macros logging into syslog.
 */


#ifndef _DEBUG_H
#define _DEBUG_H

#include <syslog.h>

#ifdef _DEBUG
#define DBGOPEN(n)\
openlog(n, LOG_PID|LOG_CONS, LOG_USER)

#define DBGMSG(args...)\
syslog(LOG_DEBUG, ##args)

#else
#define DBGOPEN(f) 
#define DBGMSG(args...) 
#endif

#endif

